﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ReportSummaryTBS.aspx.cs" Inherits="ReportView_ReportSummaryTBS" %>

<%@ Register Assembly="DevExpress.Web.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dxtc" %>
<%@ Register Assembly="DevExpress.Web.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dxrp" %>
<%@ Register Assembly="DevExpress.XtraCharts.v8.2.Web, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.XtraCharts.Web" TagPrefix="dxchartsui" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.XtraCharts.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.XtraCharts" TagPrefix="cc1" %>
<%@ Register Assembly="DevExpress.Web.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.Web.ASPxObjectContainer" TagPrefix="dxoc" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.Web.ASPxClasses" TagPrefix="dxw" %>
<%@ Register Assembly="DevExpress.Web.v8.2, Version=8.2.4.0, Culture=neutral, PublicKeyToken=49d90c14d24271b5"
    Namespace="DevExpress.Web.ASPxClasses" TagPrefix="dxw" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>交换机小时个呼</title>
    <link href="../App_Themes/CSS/default.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/CSS/style.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/CSS/Report.css" rel="stylesheet" type="text/css" />

    <script src="../JavaScript/DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script type="text/javascript">
        //设置一个元素在页面居中，元素的position应为absolute
        function setElementInPageCenter(obj) {
            obj.style.left = document.body.clientWidth / 2 - obj.clientWidth / 2;
            obj.style.top = document.body.clientHeight / 2 - obj.clientWidth / 2;
        }
        function checkValue() {
            if ((equipname.lastSuccessValue == null || equipname.lastSuccessValue == '') && (indicators.lastSuccessText == '-----全部----')) {
                alert('请选择统计指标!');
                return false;
            }
            return true;
        }
    </script>

</head>
<body >
    <form id="form1" runat="server">
    <div style="width:960px;">
        <table style="width: 100%;" cellpadding="0" cellspacing="0">
            <tr>
                <td style="height: 26px;">
                    <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td style="width: 1px; background-image: url('../images/ttbkBorder.jpg');">
                            </td>
                            <td align="left" style="background-image: url('../images/ttbkCenter.jpg');">
                                <b id="bLabel" runat="server"></b>
                            </td>
                            <td style="width: 1px; background-image: url('../images/ttbkBorder.jpg');">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div style="width:960px;">
        <table style="width: 100%; background-color: #EEF3FF; font-weight: bold" cellpadding="0"
            cellspacing="0">
            <tr>
                <td id="tdTime">
                    时间：<input type="text" class ="input" id='StartDate' runat="server" onclick="WdatePicker({dateFmt:'yyyy/MM/dd HH:mm:ss'})" />
                    至<input type="text" class ="input" id='EndDate' runat="server" onclick="WdatePicker({dateFmt:'yyyy/MM/dd HH:mm:ss'})" />
                </td>
                <td id="tdEquipMent" runat="server">
                    交换机:
                </td>
                <td id="tdEquipName" runat="server">
                    <dxe:ASPxComboBox ID="ASPxComboBoxEquipName" runat="server" Width="100%" ValueType="System.String"
                        SelectedIndex="0" ClientInstanceName="equipname">
                        <ClientSideEvents SelectedIndexChanged="function(s, e) {
                        if(s.lastSuccessValue!=''){
                            indicators.SetSelectedIndex(0);
                        } 
                        else{
                            indicators.SetSelectedIndex(1);
                        }                      
                          }" />
                        <Items>
                        </Items>
                    </dxe:ASPxComboBox>
                </td>
                <td id="tdIndicator" runat="server">
                    指标:
                </td>
                <td id="tdIndicators" runat="server">
                    <dxe:ASPxComboBox ID="ASPxComboBoxIndicators" ClientInstanceName="indicators" runat="server"
                        Width="100%" ValueType="System.String" SelectedIndex="0">
                        <ClientSideEvents SelectedIndexChanged="function(s, e) { }" />
                        <Items>
                        </Items>
                    </dxe:ASPxComboBox>
                </td>
                <td id="tdSelAlarm">
                    <dxe:ASPxButton ID="btnSelAlarm" runat="server" Text="统计" UseSubmitBehavior="False"
                        AutoPostBack="false" OnClick="btnSelAlarm_Click">
                        <ClientSideEvents Click="function(s, e) { 
                        if(!checkValue())
                        {
                            e.processOnServer =false;
                        }
                       
                            
                         }" />
                    </dxe:ASPxButton>
                </td>
                <td id="tdXLsExport">
                    <dxe:ASPxButton ID="btnXlsExport" runat="server" Text="导出Excell" UseSubmitBehavior="False"
                        AutoPostBack="false" OnClick="btnXlsExport_Click">
                        <ClientSideEvents Click="function(s,e){
                       if( page.activeTabIndex==0)
                       {
                       chart.SaveToDisk('xls');
                       e.processOnServer =false;
                       }
                         }" />
                    </dxe:ASPxButton>
                </td>
                <td>
                    &nbsp;<%--占位--%>
                </td>
            </tr>
        </table>
    </div>
    <div id="divContent">
        <dxtc:ASPxPageControl ID="ASPxPageControl1" runat="server" ActiveTabIndex="0" EnableCallBacks="true"
            ClientInstanceName="page" Width="98%" OnActiveTabChanged="ASPxPageControl1_ActiveTabChanged">
            <TabPages>
                <dxtc:TabPage Text="统计图">
                    <ContentCollection>
                        <dxw:ContentControl ID="ContentControl1" runat="server">
                            <div id="divChart" runat="server" style="width:930px; border: solid 1px #A3C0E8; ">
                                <table>
                                    <tr>
                                        <td style ="width :700px;">
                                            &nbsp;
                                        </td>
                                        <td align="center" style="width: 115px;">
                                            <dxe:ASPxCheckBox ID="checkBoxShowLabel" runat="server" Wrap="False" Text="显示各点数据" Checked ="true">
                                                <ClientSideEvents CheckedChanged="function(s, e) {  chart.PerformCallback('ShowLabels');  }" />
                                            </dxe:ASPxCheckBox>
                                        </td>
                                        <td align="center" style="width: 105px; padding-top: 1px;">
                                            <dxe:ASPxComboBox ID="cbViewType" runat="server" Width="100px" ValueType="System.String"
                                                SelectedIndex="0">
                                                <ClientSideEvents SelectedIndexChanged="function(s, e) { 
                                                 if(!checkValue())
                                                    {
                                                        e.processOnServer =false;
                                                    }
                                                    else{
                                                      if(ASPxPageControl1_checkBoxShowLabel.GetChecked())
                                                            {
                                                                chart.PerformCallback('ViewType');
                                                            }
                                                        else
                                                        {
                                                           chart.PerformCallback('ShowLabels'); 
                                                        }
                                                    }
                                                }" />
                                                <Items>
                                                    <dxe:ListEditItem Text="柱状图" Value="Bar" />
                                                    <dxe:ListEditItem Text="曲线图" Value="Lines" />
                                                <%-- <dxe:ListEditItem Text="饼图" Value="Pie" />
                                                    <dxe:ListEditItem Text="3D饼图" Value="Pie3D" />--%>
                                                </Items>
                                            </dxe:ASPxComboBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <dxchartsui:WebChartControl ID="WebChartControl1" runat="server" Height="420px" Width="925px"
                                                DiagramTypeName="XYDiagram" ClientInstanceName="chart" OnCustomCallback="WebChartControl1_CustomCallback">
                                                <Titles>
                                                    <cc1:ChartTitle Text="不成功业务比例(DXT交换机)"></cc1:ChartTitle>
                                                    <cc1:ChartTitle Alignment="Far" Dock="Bottom" Font="Tahoma, 8pt" Text="Metarnet" TextColor="Gray">
                                                    </cc1:ChartTitle>
                                                </Titles>
                                                <FillStyle FillOptionsTypeName="SolidFillOptions">
                                                    <Options HiddenSerializableString="to be serialized" />
                                                </FillStyle>
                                                 <Diagram>
                                                    <axisx datetimemeasureunit="Month">
 <Label Angle="90" Antialiasing="True"  Font="Tahoma, 6pt, style=Bold"></Label>
 </axisx>
                                                </Diagram>
                                                <SeriesTemplate LabelTypeName="PointSeriesLabel" PointOptionsTypeName="PointOptions"
                                                    SeriesViewTypeName="LineSeriesView">
                                                    <PointOptions HiddenSerializableString="to be serialized">
                                                    </PointOptions>
                                                    <Label HiddenSerializableString="to be serialized">
                                                        <FillStyle FillOptionsTypeName="SolidFillOptions">
                                                            <Options HiddenSerializableString="to be serialized" />
                                                        </FillStyle>
                                                    </Label>
                                                    <View HiddenSerializableString="to be serialized">
                                                    </View>
                                                    <LegendPointOptions HiddenSerializableString="to be serialized">
                                                    </LegendPointOptions>
                                                </SeriesTemplate>
                                                <BorderOptions Visible="False" />
                                            </dxchartsui:WebChartControl>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </dxw:ContentControl>
                    </ContentCollection>
                </dxtc:TabPage>
                <dxtc:TabPage Text="统计表">
                    <ContentCollection>
                        <dxw:ContentControl ID="ContentControl2" runat="server">
                            <div id="Div2" runat="server"  style="width:930px;">
                                <dxwgv:ASPxGridView ID="Grid" runat="server" SkinID="ASPxGridView_Aqua" ClientInstanceName="grid"  OnPageIndexChanged ="Grid_PageIndexChanged"
                                    KeyFieldName="index_num" AutoGenerateColumns="false" Width="100%" Settings-VerticalScrollableHeight="420" >
                                    <Columns>
                                    </Columns> 
                                    <StylesPager>
                                        <Button HorizontalAlign="Left">
                                        </Button>
                                    </StylesPager>
                                    <Settings ShowHeaderFilterButton="false" ShowTitlePanel="true" />
                                    <SettingsBehavior ColumnResizeMode="Control"  AllowFocusedRow="True" AllowSort="true" />
                                    <Styles>
                                        <AlternatingRow Enabled="true" />
                                        <PagerBottomPanel HorizontalAlign="Left">
                                        </PagerBottomPanel>
                                    </Styles>
                                </dxwgv:ASPxGridView>
                                <dxwgv:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="Grid">
                                </dxwgv:ASPxGridViewExporter>
                            </div>
                        </dxw:ContentControl>
                    </ContentCollection>
                </dxtc:TabPage>
            </TabPages>
            <TabStyle Width="100px">
            </TabStyle>
        </dxtc:ASPxPageControl>
    </div>
    <input type="hidden" runat="server" id="hidConnectString" name="hidConnectString" /><%--数据库连接字符串--%>
    <input type="hidden" runat="server" id="hidProcedure" name="hidProcedure" /><%--存储过程名称--%>
    <input type="hidden" runat="server" id="hidReportID" name="hidReportID" /><%--报表类型ID--%>
    <input type="hidden" runat="server" id="hidWebChartTitle" name="hidWebChartTitle" /><%--报表类型ID--%>
    <input type="hidden" runat="server" id="hidProcedureTable" name="hidProcedureTable" /><%--存储过程名称--%>
    <input type="hidden" runat="server" id="hidAbscissa" name="hidAbscissa" /><%--横坐标字段名称--%>
    <input type="hidden" runat="server" id="hidOrdinate" name="hidOrdinate" /><%--纵坐标字段名称--%>
    <input type="hidden" runat="server" id="hidEquipName" name="hidEquipName" /><%--设备名称字段名称--%>
     <input type="hidden" runat="server" id="hidUnits" name="hidUnits" /><%--指标单位--%>
    </form>
</body>
</html>
